<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateContentTemplateModelsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('content_template_models', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title')->comment('模板标题');
            $table->string('author');
            $table->string('site');
            $table->string('preview')->comment('模板预览图');
            $table->unsignedTinyInteger('using')->default(0)->comment('是否正在使用');
            $table->string('name')->comment('模板目录名称');
            $table->text('package');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('content_templates');
    }
}
